package com.cln.salesTaxes;

import java.math.BigDecimal;

public class Tax implements ITax {

	protected BigDecimal taxRate = new BigDecimal("0.1");

	public Tax(BigDecimal taxRate) {
		this.taxRate = taxRate;
	}

	public Tax() {
		super();
	}

	public BigDecimal getTaxRate() {
		return taxRate;
	}

	public void setTaxRate(BigDecimal taxRate) {
		this.taxRate = taxRate;
	}

	public BigDecimal caculateTaxes(BigDecimal price) {
		return SalesTools.roundOff(price.multiply(getTaxRate()));
	}
}